package com.study.s10.observer;

import com.study.s10.observer.model.Person;

public class MainClass {
	
	public static void main(String[] args) {
		
		Person person = new Person();
		//注册观察者
		person.addObserver(new MyObserver());
		person.setAge(12);
		
		BlogUser bu = new BlogUser();
		bu.addObserver(new BlogObserver());
		bu.publishBlog("第一篇博客", "我的第一篇博客搞定了");
	}
}
